//
//  EdictDictionary.h
//  Edict
//
//  Created by Mathieu on 15/09/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "DictionaryMO.h"

@class NetworkConnectionMonitor;


@interface EdictDictionary : DictionaryMO < NSCoding >{
	BOOL isConnected;
	NetworkConnectionMonitor *connectionMonitor;

}

-(NSString *)dictType;
-(bool)isRemote;

#pragma mark Archiving Support
- (void)encodeWithCoder:(NSCoder *)coder;
- (id)initWithCoder:(NSCoder *)coder;


#pragma mark API to Dictionaries
-(void)connect;
-(void)disconnect;
-(NSMutableString *)stringBlobOfDefinitions:(NSString *)word;
- (NSArray *)arrayOfDefinitions:(NSString *)word;

#pragma mark Network Connection Monitor
-(NetworkConnectionMonitor *)networkConnectionMonitor;
-(void)createConnectionMonitor;

//This will package and unpack entire dictionary objects into and out of the system. 
//Fully indexed and prepared dictionaries that is.
//EXPORT
//So when a user clicks export, Words will suck up the index and edict file into a bundle, archive it
//and dump it wherever the user wants.
//IMPORT
//When a user clicks import, Words will take the dictionary, determine the type, create a new instance
//of the correct entity, unpack the index and file, put them where they need to go (in the Application 
//Support/Words/Dictionaries folder) and then the user can go ahead and set them to be 'in use'.


@end
